package com.codemart.controller;

import com.codemart.result.Result;
import com.codemart.service.JobService;
import com.codemart.vo.JobInfoVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Slf4j
@CrossOrigin
@RestController
@RequestMapping("/job")
public class JobController {

    @Autowired
    JobService jobService;

    @GetMapping("/jobList")
    public Result getJobList(@RequestParam(required = false) String search){
        List<JobInfoVO> jobInfoVOList = jobService.getJobList(search);
        return Result.success(jobInfoVOList);
    }
}
